wire [3:0] lsm_rd_sel;

ctz16 u_ctz16_reglist(
        .in(i[15:0]),
        .out(lsm_rd_sel)
);

wire ls_post = ~i[24] ;
//wire ls_off  =  i[24] & ~i[21];
wire ls_pre  =  i[24] &  i[21];

wire lsx_strh  = ~i[20] & ~i[6] ;
wire lsx_ldrd  = ~i[20] &  i[6] & ~i[5];
wire lsx_strd  = ~i[20] &  i[6] &  i[5];
wire lsx_ldrh  =  i[20] & ~i[6] ;
wire lsx_ldrsb =  i[20] &  i[6] & ~i[5];
wire lsx_ldrsh =  i[20] &  i[6] &  i[5];

wire lsm_restore_cpsr = i[22] & i[20] & i[15];

wire [3:0] mul_gpr_wsel0 = i[23] ? i[15:12] : i[19:16] ;
wire [3:0] mul_gpr_wsel1 = i[23] ? i[19:16] : i[15:12] ;

`include "enum.vh"
